from arq import create_pool
from arq.connections import RedisSettings
from app.core.config import settings

# ARQ Redis设置
arq_redis_settings = RedisSettings(
    host=settings.REDIS_HOST,
    port=settings.REDIS_PORT,
    password=settings.REDIS_PASSWORD,
    database=0
)

# 创建ARQ Redis连接池的函数
async def create_arq_pool():
    return await create_pool(arq_redis_settings)